package com.shekhar.paas.repository;

import java.util.Date;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.stereotype.Repository;

import com.shekhar.paas.domain.Story;

@Repository
public interface StoryRepository extends PagingAndSortingRepository<Story, String> {

    Page<Story> findByTweets_IsoLanguageCodeAndCreationDateBetween(String isoLanguageCode, Date start, Date end, Pageable pageable);

    Page<Story> findByTweets_IsoLanguageCodeAndTagsAndCreationDateBetween(String isoLanguageCode, String tags, Date startDate, Date endDate,
            Pageable pageable);
}
